package com.ws.genercity.demo06;

/**
 * @author 13353
 */
public class MainClass06 {
    public static void main(String[] args) {
        Box<Number> objectBox = new Box<>();
        objectBox.setFirst(100);
        showBox(objectBox);

        Box<Integer> box = new Box<>();
        box.setFirst(1111);
        showBox(box);
    }
    public static void showBox(Box<? extends Number> box) {
        Number first = box.getFirst();
        System.out.println(first);
    }

//    public static void showBox2(Box<Integer> box) {
//        Number first = box.getFirst();
//        System.out.println(first);
//    }
}
